package com.liveinstars.account.business.mapper;

import com.liveinstars.account.business.domain.bo.User;
import org.springframework.dao.DataAccessException;

import java.util.List;

/**
 * @author tomsun28
 * @date 10:35 2018/4/22
 */
public interface AuthUserMapper {

    /**
     * description TODO
     *
     * @return int
     * @throws DataAccessException when
     */
    int deleteByUserName(String userName) throws DataAccessException;

    /**
     * description TODO
     *
     * @param record 1
     * @return int
     * @throws DataAccessException when
     */
    int insert(User record) throws DataAccessException;

    /**
     * description TODO
     *
     * @param record 1
     * @return int
     * @throws DataAccessException when
     */
    int insertSelective(User record) throws DataAccessException;

    /**
     * description TODO
     *
     * @return com.liveinstars.account.business.domain.bo.User
     * @throws DataAccessException when
     */
    User selectByUserName(String userName) throws DataAccessException;

    User selectByMobile(String uid) throws DataAccessException;
    /**
     * description TODO
     *
     * @param record 1
     * @return int
     * @throws DataAccessException when
     */
    int updateByPrimaryKeySelective(User record) throws DataAccessException;

    /**
     * description TODO
     *
     * @param record 1
     * @return int
     * @throws DataAccessException when
     */
    int updateByPrimaryKey(User record) throws DataAccessException;

    /**
     * description TODO
     *
     * @param appId 1
     * @return java.lang.String
     * @throws DataAccessException when
     */
    String selectUserRoles(String appId) throws DataAccessException;

    /**
     * description TODO
     *
     * @param appId 1
     * @return com.liveinstars.account.business.domain.bo.User
     * @throws DataAccessException when
     */
    User selectByUniqueKey(String appId) throws DataAccessException;

    /**
     * description TODO
     *
     * @return java.util.List<com.liveinstars.account.business.domain.bo.User>
     * @throws DataAccessException when
     */
    List<User> selectUserList() throws DataAccessException;

    /**
     * description TODO
     *
     * @param roleId 1
     * @return java.util.List<com.liveinstars.account.business.domain.bo.User>
     * @throws DataAccessException when
     */
    List<User> selectUserListByRoleId(Integer roleId) throws DataAccessException;

    /**
     * description TODO
     *
     * @param roleId 1
     * @return java.util.List<com.liveinstars.account.business.domain.bo.User>
     * @throws DataAccessException when
     */
    List<User> selectUserListExtendByRoleId(Integer roleId) throws DataAccessException;

    User selectById(Integer id) throws DataAccessException;

    List<User> selectUserListByIds(List<Integer> userids);
}